#include "virtualdevice.h"

static VirtualDevice *virtualDevice = NULL;

VirtualDevice::VirtualDevice()
    :IVirtualDevice()
{

}

VirtualDevice::~VirtualDevice()
{

}

int VirtualDevice::sendTimeFunc(const QString &opt, const QString &timeName)
{
    optName = opt;
    return 0;
}

int VirtualDevice::sendCommand(const QString &optName, const QString &cmdName, const QByteArray &data)
{
    return 0;
}

int VirtualDevice::getKeyState()
{
    return 0;
}

QString VirtualDevice::getOptName(){
    return optName;
}


QString VirtualDevice::getTimeFuncResult(){
    QString output = "";
    return output;
}

CountResultDao *VirtualDevice::getFPGAResult()
{

}

QString VirtualDevice::getFaultDescription()
{

}

bool VirtualDevice::isValid()
{

}

void VirtualDevice::onSerialDataArrived(const QByteArray &data)
{

}

VirtualDevice *VirtualDevice::getInstance()
{
    if(virtualDevice == NULL)
    {
        virtualDevice = new VirtualDevice();
    }
    return virtualDevice;
}


